package STUDENTS.DANGTIENLONG.MVC.Level02;

public class Models {
	public double Area (Triangle obj){
		double p =  (obj.getSide1()+ obj.getSide2()+obj.getSide3())/2;
		return Math.sqrt(p*(p-obj.getSide1())* (p-obj.getSide2())*(p-obj.getSide3()));
	}
	public double Perimeter (Triangle obj){
		return obj.getSide1()+ obj.getSide2()+obj.getSide3();
	}
	public String toString (Triangle obj) {
		return "Triangle: side1 = " + obj.getSide1() + ", " + " side2 = " + obj.getSide2() + ", " + " side3 = " + obj.getSide3();
	}
}	
